package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author 张永远
 * @since 2020-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_menu")
public class MenuDo extends Model<MenuDo> {

    private static final long serialVersionUID=1L;

    /**
     * 唯一识别id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 父级uuid  顶级默认为 ‘top’
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 菜单名
     */
    @TableField("name")
    private String name;

    /**
     * 菜单名（日文）
     */
    @TableField("jp_name")
    private String jpName;

    /**
     * 菜单url
     */
    @TableField("url")
    private String url;

    /**
     * 菜单组件
     */
    @TableField("component")
    private String component;

    /**
     * 菜单icon
     */
    @TableField("icon")
    private String icon;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 系统类型 0 OMS 1ERP 2物流链
     */
    @TableField("system_")
    private Integer system;

    /**
     * 类型（1：目录  2：菜单）
     */
    @TableField("type")
    private Integer type;

    /**
     * 目录或菜单时：0前后台菜单 1仅后台菜单  按钮时 0前后台都有 2前台按钮 1 仅后台按钮
     */
    @TableField("show_for")
    private Integer showFor;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
